<?php

class ReviewModel extends AbstractModel
{

    protected $_videos;
    
    protected $_images;
    protected $_opinions;
    protected $_comments;
    protected $_user;
    protected $_maps;
    protected $_urls;
    protected $_category;
    protected $_similarModels;
    
    public function setSimilarModels($models)
    {
	$this->_similarModels = $models;
    }
    public function getSimilarModels()
    {
	return $this->_similarModels;
    }

    public function setComments($comments)
    {
	$this->_comments = $comments;
    }

    public function getComments()
    {
	return $this->_comments;
    }

    public function setVideos($videos)
    {
	$this->_videos = $videos;
    }

    public function getVideos()
    {
	return $this->_videos;
    }

    public function setImages($images)
    {
	$this->_images = $images;
    }

    public function getImages()
    {
	return $this->_images;
    }

    public function setOpinions($opinions)
    {
	$this->_opinions = $opinions;
    }

    public function getOpinions()
    {
	return $this->_opinions;
    }

    public function setUser(UserModel $user)
    {
	$this->_user = $user;
    }

    public function getUser()
    {
	return $this->_user;
    }

    public function setMaps($maps)
    {
	$this->_maps = $maps;
    }

    public function getMaps()
    {
	return $this->_maps;
    }

    public function setUrls($urls)
    {
	$this->_urls = $urls;
    }

    public function getUrls()
    {
	return $this->_urls;
    }

    public function setCategory(CategoryModel $category)
    {
	$this->_category = $category;
    }

    public function getCategory()
    {
	return $this->_category;
    }

    public function getViewLink($hash = null)
    {
	if ($this->getId() && $this->getDbData('url')) {
	    $params = array('id' => $this->getId(), 'url' => $this->getDbData('url'));
	    if ($hash) {
		$params['#'] = $hash;
	    }
	    return Yii::app()->createUrl('review/view', $params);
	}
	return false;
    }

    protected function _init()
    {
	
    }

}
